<?php
require_once '../../../core/fcCommon.php';
require_once '../../../core/fcORM_raschada_rx.php';
require_once '../../../log/Logger.php';
Logger::configure('../../../log4php.xml');
$logger = Logger::getLogger(__FILE__);

$json = getJsonFromRequest();
$obj = new Entity("raschada_rx_drug");
foreach($json as $key => $value){
    $obj->put($key, $value);
}
$obj->put('update_datetime', date("Y-m-d H:i:s", time() - 3600));

$condition = new Map();
$condition->put("drug_id", $json["drug_id"]);

$conn = new Connection();
$conn->merge($obj, $condition);
?>
